﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mahanet.Abyss.PathCalculation
{
	public class Line3D
	{
		#region C'tor

		public Line3D(Coordinate3D linePoint, Vector3D direction)
		{
			if (direction.IsZero())
			{
				throw new ArgumentException("direction");
			}

			this.LinePoint = linePoint;
			this.NormalizedDirection = direction.Normalized();
		}

		public Line3D(Coordinate3D firstPoint, Coordinate3D secondPoint)
		{
			if (firstPoint.Equals(secondPoint))
			{
				throw new ArgumentException("direction");
			}

			this.LinePoint = firstPoint;
			this.NormalizedDirection = new Vector3D(firstPoint, secondPoint).Normalized();
		}

		#endregion

		#region Public Properties

		public Coordinate3D LinePoint { get; private set; }
		public Vector3D NormalizedDirection { get; private set; }

		#endregion

		#region Public Methods
		
		public double OrientedDistance(Coordinate3D coordinate)
		{
			throw new NotImplementedException();
		}

		public Coordinate3D GetIntersectionPoint(Line3D other)
		{
			throw new NotImplementedException();
		}

		public bool IsPointOnLine(Coordinate3D coordinate)
		{
			throw new NotImplementedException();
		}

		#endregion
	}
}
